package cn.sczc.jh.client.controller.synch;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cn.sczc.jh.client.base.AbstractController;
import cn.sczc.jh.client.service.synch.SynchService;

@RestController
@RequestMapping("/api")
public class SynchController extends AbstractController {

	@Autowired
	private SynchService synchService;

	@RequestMapping(value = "synch", method = RequestMethod.POST)
	public ResponseEntity<ModelMap> synchData(ModelMap modelMap, @RequestBody Map<String,Object> params){
		boolean synchState = synchService.synchData(params);
		return setSuccessModelMap(modelMap, synchState);
	}
	
}
